<script src="/res/js/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript"> 
var xset = [];//X轴数据集    
var yset = [];//Y轴数据集  
  $(document).ready(function() {  
    $.ajax({
			type : 'get',
			url : '/wms/report/materialReport',//请求数据的地址
			success : function(data) {						
				$.each(data, function(i, item) {					
					xset.push(item.mat_name);
					yset.push(item.cur_sum);					
				});
			}
    });	
    setTimeout(drawchart,500);    
  });
  
function drawchart(){ 	
	//highchart绘图
    Highcharts.chart('canvas', {
        chart: {
            type: 'line'
        },
        title: {
            text: '物料种类统计--Top10'
        },        
        xAxis: {
            categories:xset,
            crosshair: true
        },
        yAxis: {
            min: 0,
            title: {
                text: '数量（种）'
            }
        },        
        series: [{
            name: '物料种类',
            data: yset

        }],credits: {
            enabled: false
        } 
    });     
 }
			

</script>
<script src="/res/js/highcharts5.05/highcharts.js"></script>
<script src="/res/js/highcharts5.05/modules/exporting.js"></script>
<div>
    <div id="canvas"></div>   
</div> 